package test02;

import java.util.Scanner;

public class Seven {
        public static void main (String[] args) {
            int i=(int)(Math.random()*100);
            while (true) {
                Scanner input = new Scanner(System.in);
                System.out.println("请输入你的猜想：");
                int n = input.nextInt();
                if (n< i) {
                    System.out.println("猜小了");
                } else if (n>i) {
                    System.out.println("猜大了");
                } else{
                    System.out.println("猜对了！！");
                    break;
                }
            }
        }
    }


